<h1>Editing event</h1>


<script type="text/javascript">
function OnSubmitForm(){
	if (document.pressed == 'up') {
		document.myform.action = "/events/editevent";
	}
}
</script>
<form name="myform" action="/events/uploadfile" method="post" enctype="multipart/form-data">
	<div align="center">
	<table border="1" width="100%" id="table1">
	<tr>
		<tr>
			<td width="110"><p align="right">Tên sự kiện:
			</td>
			<td width="183"><%= @events.name %><%= @title %><input type="label" name ="idevents" value="<%=@idevent%>"/>
			</td>
			<td rowspan="2">
				<% @images.each do |image| %>
    				<img border="0" src="/images/events/<%= image.title %>" name="I1" width="100" height="100" type="image">  					
				<% end %>
			</td>
		</tr>
		<tr>
			<td width="110" height="47">Tên kênh:
			</td>
			<td width="183"><%= @channels %>
			</td>
			<p align="right"></td>
			<td width="23" height="47"><b>
			</td>
			
		</tr>
		<tr>
			<td height="23">
				<p>
				
				</p>
			</td>
			<td>
				
			 </td>
			<td>
				<p>Chú thích ảnh:<input type=="text" name="txtDiscription" size=="30"><br>
					<label for="upload_file">Chọn file ảnh</label>:<input type="file" name="upload[datafile]" size="40" /><br>
			</td>
		</tr>
		<tr>
			<td width="110">&nbsp;</td>
			<td>&nbsp;</td>
			<td><input type="submit" name="up" onclick="document.pressed=this.value" value="up" /><br>
			</td>
		</tr>
	</table>
</form>

<%= link_to 'Show', @event %> |
<%= link_to 'Back', events_path %>
